#include<vector>

struct MeshStruct {
	float *m_geom;
	int *m_tri;
	int m_nGeom;
	int m_nTri;

	MeshStruct() {
		m_geom = 0;
		m_tri = 0;
		m_nGeom = 0;
		m_nTri = 0;
	}

	MeshStruct(float *geom, int* tri, int nG, int nT) {
		// Here: number of vertices/triangles times x3
		m_nGeom = nG;
		m_geom = new float[m_nGeom];
		for(int i = 0; i < m_nGeom; i++)
			m_geom[i] = geom[i];
		m_nTri = nT;
		m_tri = new int[m_nTri];
		for(int i = 0; i < m_nTri; i++)
			m_tri[i] = tri[i];
	}

	MeshStruct(MeshStruct& ms) {
		m_nGeom = ms.m_nGeom;
		m_geom = new float[m_nGeom];
		for(int i = 0; i < m_nGeom; i++)
			m_geom[i] = ms.m_geom[i];
		m_nTri = ms.m_nTri;
		m_tri = new int[m_nTri];
		for(int i = 0; i < m_nTri; i++)
			m_tri[i] = ms.m_tri[i];
	}

	MeshStruct(std::vector<float> verticesVector, std::vector<int> trianglesVector) {
		// Here: number of vertices/triangles times x3
		m_nGeom = (int)verticesVector.size();
		m_geom = new float[m_nGeom];
		for(int i = 0; i < m_nGeom; i++) {
			m_geom[i] = verticesVector[i];
		}
		m_nTri = (int)trianglesVector.size();
		m_tri = new int[m_nTri];
		for(int i = 0; i < m_nTri; i++) {
			m_tri[i] = trianglesVector[i];
		}
	}
	
	~MeshStruct() {
		delete[] m_geom;
		delete[] m_tri;
	}	
};

struct BoundingVolume {
	float m_x;
	float m_y;
	float m_z;
	float m_size;

	BoundingVolume() {
		m_x = 0.0;
		m_y = 0.0;
		m_z = 0.0;
		m_size = 0.0;
	}

	BoundingVolume(float size, float x, float y, float z) {
		m_x = x;
		m_y = y;
		m_z = z;
		m_size = size;
	}

	float* getCenter(float *c) {
		//float c[3];
		c[0] = m_x;
		c[1] = m_y;
		c[2] = m_z;
		return c;
	}

	float getSize() {
		return m_size;
	}	
};